package com.ruoyi.dispatch.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.dispatch.domain.MiningTeam;
import com.ruoyi.dispatch.mapper.MiningTeamMapper;
import com.ruoyi.dispatch.service.IMiningTeamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 回采队信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-03
 */
@Service
public class MiningTeamServiceImpl implements IMiningTeamService
{
    @Autowired
    private MiningTeamMapper miningTeamMapper;

    /**
     * 查询回采队信息
     * 
     * @param miningTeamId 回采队信息主键
     * @return 回采队信息
     */
    @Override
    public MiningTeam selectDispatchMiningTeamByMiningTeamId(Long miningTeamId)
    {
        return miningTeamMapper.selectMiningTeamByMiningTeamId(miningTeamId);
    }

    /**
     * 查询回采队信息列表
     * 
     * @param miningTeam 回采队信息
     * @return 回采队信息
     */
    @Override
    public List<MiningTeam> selectDispatchMiningTeamList(MiningTeam miningTeam)
    {
        return miningTeamMapper.selectMiningTeamList(miningTeam);
    }

    /**
     * 新增回采队信息
     * 
     * @param miningTeam 回采队信息
     * @return 结果
     */
    @Override
    public int insertDispatchMiningTeam(MiningTeam miningTeam)
    {
        miningTeam.setCreateTime(DateUtils.getNowDate());
        return miningTeamMapper.insertMiningTeam(miningTeam);
    }

    /**
     * 修改回采队信息
     * 
     * @param miningTeam 回采队信息
     * @return 结果
     */
    @Override
    public int updateDispatchMiningTeam(MiningTeam miningTeam)
    {
        miningTeam.setUpdateTime(DateUtils.getNowDate());
        return miningTeamMapper.updateMiningTeam(miningTeam);
    }

    /**
     * 批量删除回采队信息
     * 
     * @param miningTeamIds 需要删除的回采队信息主键
     * @return 结果
     */
    @Override
    public int deleteDispatchMiningTeamByMiningTeamIds(Long[] miningTeamIds)
    {
        return miningTeamMapper.deleteMiningTeamByMiningTeamIds(miningTeamIds);
    }

    /**
     * 删除回采队信息信息
     * 
     * @param miningTeamId 回采队信息主键
     * @return 结果
     */
    @Override
    public int deleteDispatchMiningTeamByMiningTeamId(Long miningTeamId)
    {
        return miningTeamMapper.deleteMiningTeamByMiningTeamId(miningTeamId);
    }
}
